<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMedicalComplaintsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_medical_complaints', function (Blueprint $table) {
            $table->increments('id')->comment("主诉表");
            $table->unsignedInteger('record_id')->index()->comment("关联medical_records_id");
            $table->text('symptom')->nullable()->comment('症状');
            $table->text('blood_glucose')->nullable()->comment('血糖测量值');
            $table->unsignedTinyInteger('weightchange')->comment('0无变化 1上升, 2 下降');
            $table->unsignedTinyInteger('weightchangestatus')->nullable()->comment('1明显，2不明显');
            $table->string('remark')->default('')->comment('备注');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_medical_complaints');
    }
}
